home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2005 November / WNnov2005.iso / Windows / Indispensables / Picture Pro / 4798_eval.exe / bin\vae.vobj < prev    next >
Text File  |  2002-05-13  |  5KB  |  227 lines

  1. //startx 576
  2. //starty 395
  3. //by VAS1.54
  4. object vaestart:Frame
  5. {
  6.     predefine object fw:FileView;
  7.     predefine object bottomframe:Frame
  8.     {
  9.         predefine object OK_BUTTON:ButtonText
  10.         {
  11.             predefine func OnButtonActivate();
  12.         }
  13.         predefine object CANCEL_BUTTON:ButtonText
  14.         {
  15.             predefine func OnButtonActivate();
  16.         }
  17.     }
  18.     with (root)
  19.     {
  20.         app_style = (NoEscQuit,SaveRegistry);
  21.     }
  22.     width=640p;
  23.     height=480p;
  24.     //bkg_color=(80,120,207);
  25.     layout=(Vertical);
  26.     hmargin=5p;
  27.     vmargin=5p;
  28.     x=Center;
  29.     y=Center;
  30.     //bkg_style = (NoClient);
  31.     draw_style=(WinMoveSash,TopLevel);
  32.     object background: BorderImage
  33.     {
  34.         top_border=26p;
  35.         left_border=6p;
  36.         right_border=6p;
  37.         bottom_border=6p;
  38.         pixmap="background.jpg";
  39.     }
  40.     object logo: BorderImage
  41.     {
  42.         x = 4p;
  43.         y = 4p;
  44.         draw_style= (NonClient,PickDisable);
  45.         pixmap="logo.jpg";
  46.     }
  47.     object wtitle: Label
  48.     {
  49.         draw_style= (NonClient,PickDisable);
  50.         x = 32p;
  51.         y = 7p;
  52.         color = (0,0,80);
  53.         font_weight = Bold;
  54.         text="Visviva Player - (Please select the \".vexe\" or \".vobj\" file to play)";
  55.     }
  56.     object fw:FileView
  57.     {
  58.         style=(ColumnShow);
  59.         width=626 pixel;
  60.         height=414 pixel;
  61.         border_style=Emboss;
  62.         layout=(UseMaxW,UseMaxH);
  63.         bkg_color = white;
  64.         hmargin=0p;
  65.         vmargin=0p;
  66.         x=0p;
  67.         y=0p;
  68.         filter=".vexe,.vobj";
  69.         draw_style=(Group);
  70.         enter()
  71.         {
  72.             s:String;
  73.             s=GetRegistry("VisvivaPlayer","VisvivaPlayer","startfoler");
  74.             if (!PathAvailable(s))
  75.             {
  76.                 s=GetFolder(12); //AppData , in order to compatiable with the vae version before 2.02
  77.                 path=s+"\\visviva";
  78.             }
  79.             else path=s;
  80.         }
  81.         func SavePath()
  82.         {
  83.             s:Strings=GetSelectedFiles();
  84.             if(s.Length()>=1)
  85.             {
  86.                 folder:String=GetParentPath(s[0]);
  87.                 SetRegistry("VisvivaPlayer","VisvivaPlayer","startfoler", folder);
  88.             }
  89.             else
  90.             {
  91.                 s=GetSelectedFiles(True);
  92.                 if(s.Length()>=1)
  93.                 {
  94.                     SetRegistry("VisvivaPlayer","VisvivaPlayer","startfoler", s[0]);
  95.                 }
  96.             }
  97.         }
  98.         func OnFileActivated(file:String[])
  99.         {
  100.             if(file.Length()>=1)
  101.             {
  102.                 vae_path:String;
  103.                 vae_path=GetFolder(VAE); 
  104.                 folder:String=GetParentPath(file[0]);
  105.                 SetRegistry("VisvivaPlayer","VisvivaPlayer","startfoler", folder);
  106.                 LaunchApp(vae_path+"\\bin\\vae.exe", "-p "+file[0]);
  107.                 Quit();
  108.             }
  109.         }
  110.         func OnFileSelected(file:String[])
  111.         {
  112.             bottomframe.OK_BUTTON.style = ();
  113.             bottomframe.OK_BUTTON.Update();
  114.         }
  115.         func OnSelectChanged()
  116.         {
  117.             bottomframe.OK_BUTTON.style = (Disabled);
  118.             bottomframe.OK_BUTTON.Update();
  119.         }
  120.     };
  121.     object bottomframe:Frame
  122.     {
  123.         width=626p;
  124.         height=52p;
  125.         border_width=0p;
  126.         layout=(FixedY,UseMaxW,AttachBottom);
  127.         hmargin=0p;
  128.         vmargin=0p;
  129.         hspacing=0p;
  130.         vspacing=0p;
  131.         x=0p;
  132.         y=414p;
  133.         object OK_BUTTON:ButtonText
  134.         {
  135.             width=100p;
  136.             x=80p;
  137.             y=13p;
  138.             style = (Disabled);
  139.             draw_style = (PopHint);
  140.             info = "Play the file";
  141.             shape = Push;
  142.             text = "Play";
  143.             func OnButtonActivate()
  144.             {
  145.                 s:Strings=fw.GetSelectedFiles();
  146.                 if(s.Length()>=1)
  147.                 {
  148.                     vae_path:String;
  149.                     vae_path=GetFolder(VAE); 
  150.                     folder:String=GetParentPath(s[0]);
  151.                     SetRegistry("VisvivaPlayer","VisvivaPlayer","startfoler", folder);
  152.                     LaunchApp(vae_path+"\\bin\\vae.exe", "-p "+s[0]);
  153.                     Quit();
  154.                 }
  155.                 else
  156.                 {
  157.                 }
  158.             }
  159.         };
  160.         object HOME_BUTTON:ButtonText
  161.         {
  162.             width=100p;
  163.             x=220p;
  164.             y=13p;
  165.             draw_style = (PopHint);
  166.             info = "Go to Visviva Player's Home Directory";
  167.             shape = Push;
  168.             text = "Home";
  169.             func OnButtonActivate()
  170.             {
  171.                 s:String=GetFolder(12); //AppData , in order to compatiable with the vae version before 2.02
  172.                 fw.path=s+"\\visviva";
  173.             }
  174.         };
  175.         object CANCEL_BUTTON:ButtonText
  176.         {
  177.             width=100p;
  178.             x=360p;
  179.             y=13p;
  180.             draw_style = (PopHint);
  181.             info = "Exit Visviva Player";
  182.             shape = Push;
  183.             text = "Exit";
  184.             func OnButtonActivate()
  185.             {
  186.                 fw.SavePath();
  187.                 Quit();
  188.             }
  189.         };
  190.         object :ButtonIcon
  191.         {
  192.             width=28p;
  193.             height=28p;
  194.             x=580p;
  195.             y=14p;
  196.             draw_style = (PopHint);
  197.             info = "Trash the selected file or foler";
  198.             focus_icon = RecycleBin;
  199.             func OnButtonActivate()
  200.             {
  201.                 s:Strings=fw.GetSelectedFiles(True);
  202.                 if(s.Length()>=1)
  203.                 {
  204.                     if( DeleteFile(s[0])==True)
  205.                         fw.path = GetParentPath(s[0]);
  206.                 }
  207.             }
  208.         };
  209.     };
  210.     object :Button
  211.     {
  212.         width=16p;
  213.         height=16p;
  214.         x=620p;
  215.         y=5p;
  216.         draw_style = (CursorSensitive,NonClient,PopHint);
  217.         info = "Close Visviva Player";
  218.         object gray_image:Image { pixmap="closebtn.jpg"; transparency=0.3; };
  219.         object focus_image:Image { pixmap="closebtn.jpg"; };
  220.         func OnButtonActivate()
  221.         {
  222.             fw.SavePath();
  223.             Quit();
  224.         }
  225.     };
  226. };
  227.